package View;


import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.Font;
import javax.swing.JFrame;
import javax.swing.JTabbedPane;

public class Admin extends JFrame{

    JTabbedPane tabpane;
    public Admin(String name) {

        setTitle("图书管理系统");
        setSize(1000, 800);
        setLocationRelativeTo(null);



        Container c = getContentPane();
        tabpane = new JTabbedPane(JTabbedPane.TOP,JTabbedPane.SCROLL_TAB_LAYOUT);
        c.add(tabpane, BorderLayout.CENTER);


        tabpane.setFont(new Font("宋体",Font.BOLD,18));
        tabpane.setBackground(new Color(51,153,255));



        /*搜索图书界面*/
        SearchBook sb = new SearchBook();
        sb.setName(name);
        tabpane.addTab("图书查阅", sb.laypane);


        /*借阅历史界面*/
        AdminBorrowHistory abh = new AdminBorrowHistory();
        abh.setPanel();
        sb.setModel(abh.model);
        tabpane.addTab("借阅历史", abh.laypane);


        /*增删改图书*/
        ChangeBook cb = new ChangeBook();
        tabpane.addTab("图书管理",cb.laypane1);

        /*用户管理*/
        UserManage um = new UserManage();
        tabpane.addTab("用户管理", um.panel);


        /*修改信息界面*/
        ChangeInfo ci = new ChangeInfo();
        ci.setName(name);
        tabpane.addTab("修改信息", ci.panel);




        this.setVisible(true);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
}
